<?php

namespace app\common\model;


class ShopGoodsGiftModel extends BaseModel
{
    protected $name = 'shop_goods_gift'; //定义用户表
    //开启自动写入时间戳
    protected $autoWriteTimestamp = false;
    // 定义自动完成的属性
    protected $auto = []; //新增修改
    protected $insert = []; //插入
    protected $update = [];

    /**
     * 取得某商品赠品列表
     */
    public function getGiftList($skuId){
        $map['sku_id'] = $skuId;
        $list = $this->cache('goods_gift'.$skuId)->where($map)->select();
        return $list;
    }

}